@import 'tuleap-highlight/highlight';
@import 'quota-display/quota-display';
@import 'tuleap-artifact-modal-fields/file-field/file-field';
@import 'tuleap-artifact-modal-fields/computed-field/computed-field';
@import 'tuleap-artifact-modal-fields/open-list-field/open-list-field';
@import 'tuleap-artifact-modal-fields/link-field/link-field';

.tuleap-artifact-modal-title {
    display: flex;
    align-items: center;
}

.tuleap-artifact-modal-title-badge {
    margin: 0 10px 0 0;
    padding: 8px 12px;
    border-radius: 24px;
    font-size: 20px;
    font-weight: 400;
    line-height: 20px;
}

.tuleap-artifact-modal-body {
    display: flex;
    padding: 0;
    overflow-y: hidden;
    background: $tlp-theme-background-color;

    &.edition-mode .tuleap-artifact-modal-followups {
        display: none;
    }
}

.tuleap-artifact-modal-artifact {
    flex: 1 1 auto;
    width: 65%;
    padding: $tlp-spacing;
    overflow-y: auto;

    .tlp-property:last-child,
    .tlp-form-element:last-child {
        margin: 0 0 $tlp-spacing;
    }
}

.tuleap-artifact-modal-artifact-field-user {
    display: flex;
    align-items: center;

    > .tlp-avatar {
        margin: 0 5px 0 0;
    }

    > a {
        text-decoration: none;

        &:hover {
            text-decoration: underline;
        }
    }
}

.tuleap-artifact-modal-artifact-field-burndown-image {
    max-width: 100%;
}

fieldset {
    margin: 0 0 $tlp-spacing;
    border: 1px solid $tlp-ui-border-normal;
    border-radius: 3px;
    background: $tlp-ui-white;
}

.tuleap-artifact-modal-followups {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    width: 35%;
    padding: $tlp-spacing;
    overflow-y: auto;
    border-left: 1px solid $tlp-ui-border-normal;
    background: $tlp-ui-white;

    &.invert-order {
        > .tuleap-artifact-modal-followups-comments {
            order: 3;
        }

        > .tuleap-artifact-modal-followups-add-form {
            order: 2;
            margin: 0 0 $tlp-double-spacing;
        }
    }
}

.tuleap-artifact-modal-followups-title {
    flex: 0 0 auto;
    order: 1;
    cursor: default;
}

.tuleap-artifact-modal-followups-title-icon {
    margin: 0 5px 0 0;
}

.tuleap-artifact-modal-followups-add-form {
    flex: 0 0 auto;
    order: 3;
    width: 100%;
    margin: $tlp-double-spacing 0 0;
}

.tuleap-artifact-modal-label-with-format {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 5px;

    > .tlp-label {
        flex: 0 0 auto;
        margin: 0 5px 0 0;
    }

    > .tlp-select {
        flex: 0 0 auto;
        width: auto;
    }
}

.tuleap-artifact-modal-followups-comments {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    order: 2;
    width: 100%;
}

.tuleap-artifact-modal-followups-comments-empty {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    margin: $tlp-spacing;
    color: transparentize($tlp-theme-color, .7);
    font-style: italic;
}

.tuleap-artifact-modal-followups-comment {
    margin: 0 0 $tlp-double-spacing;

    &:last-child {
        margin: 0;
    }

    a {
        text-decoration: none;

        &:hover {
            text-decoration: underline;
        }
    }
}

.tuleap-artifact-modal-followups-comment-header {
    display: flex;
    margin: 0 0 $tlp-half-spacing;

    > .tlp-avatar {
        flex: 0 0 auto;
        margin: 0 5px 0 0;
    }
}

.tuleap-artifact-modal-followups-comment-header-authors {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: space-around;
    font-size: 12px;

    &.multiple-authors > .tuleap-artifact-modal-followups-comment-header-author {
        flex-direction: row;

        > .tuleap-artifact-modal-followups-comment-header-time {
            margin: 0 0 0 5px;
        }
    }
}

.tuleap-artifact-modal-followups-comment-header-author {
    display: flex;
    flex-direction: column;
}


.tuleap-artifact-modal-followups-comment-content {
    font-size: 14px;
    line-height: 18px;

    p,
    ul,
    ol,
    a,
    blockquote {
        font-size: 14px;
        line-height: 18px;
    }

    img {
        max-width: 100%;
    }
}
